home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / em7sui_1 / em7sui~1.exe / ButtonTest.wr_ / ButtonTest.wr
Text File  |  1998-12-18  |  2KB  |  119 lines

  1. #VRML V2.0 utf8
  2.  
  3. # Copyright Electrohouse 1998
  4.  
  5. # This file may not be copied, modified or distributed
  6. # in any way which violates the ProtoPak licensing 
  7. # agreement established by Electrohouse.  
  8.  
  9. EXTERNPROTO BrushedMetal [ exposedField SFFloat transparency ] "..\Appearances\MetalMaterials.wrl#color34"
  10. EXTERNPROTO Blue [ exposedField SFFloat transparency ] "..\Appearances\SummerMaterials.wrl#color19"
  11.  
  12. EXTERNPROTO em7_Button [
  13.     exposedField SFNode appearance
  14.     exposedField SFBool enabled
  15.     exposedField SFColor captionColor
  16.     field MFString caption
  17.     field SFFloat fontSize
  18.     field SFFloat width
  19.     field SFFloat height
  20.     field SFFloat depth
  21.     field SFBool toggleValue
  22.     eventIn MFString set_caption
  23.     eventOut SFBool mouseDown    
  24.     eventOut SFBool mouseUp
  25.     eventOut SFBool mouseOver    
  26.     eventOut SFBool toggleValue_changed    
  27.     eventOut SFTime touchTime    
  28.     eventOut MFString caption_changed
  29. ] "..\VR_UI.wrl#em7_Button"
  30.  
  31. EXTERNPROTO em7_ContentToggle [
  32.     exposedField MFNode children
  33.     field SFBool contentsExist
  34.     eventIn SFBool set_contentsExist 
  35. ] "..\VR_UI.wrl#em7_ContentToggle"
  36.  
  37. DEF BUTTON em7_Button { 
  38.     caption ["This is the", "Electrohouse", "VRML button"]
  39.     fontSize 0.4
  40.     appearance BrushedMetal {}
  41.     width 3
  42.     height 2
  43.     depth 0.2
  44.     toggleValue FALSE
  45. }
  46.  
  47. Viewpoint {
  48.     description "Button view"
  49.     position 3 0 10
  50. }
  51.  
  52. DEF CLICKED em7_ContentToggle {
  53.     children [
  54.         Transform {
  55.             translation 4 0 0
  56.             children [
  57.                 Shape {
  58.                     appearance Blue {}
  59.                     geometry Text { string "Toggle is on" }
  60.                 }
  61.             ]
  62.         }
  63.     ]
  64.     contentsExist FALSE
  65. }
  66.  
  67. DEF UP em7_ContentToggle {
  68.     children [
  69.         Transform {
  70.             translation 4 1 0
  71.             children [
  72.                 Shape {
  73.                     appearance Blue {}
  74.                     geometry Text { string "Button is up" }
  75.                 }
  76.             ]
  77.         }
  78.     ]
  79.     contentsExist TRUE
  80. }
  81.  
  82. DEF DOWN em7_ContentToggle {
  83.     children [
  84.         Transform {
  85.             translation 4 1 0
  86.             children [
  87.                 Shape {
  88.                     appearance Blue {}
  89.                     geometry Text { string "Button is down" }
  90.                 }
  91.             ]
  92.         }
  93.     ]
  94.     contentsExist FALSE
  95. }
  96.  
  97. DEF OVER em7_ContentToggle {
  98.     children [
  99.         Transform {
  100.             translation 4 2 0
  101.             children [
  102.                 Shape {
  103.                     appearance Blue {}
  104.                     geometry Text { string "Mouse is over" }
  105.                 }
  106.             ]
  107.         }
  108.     ]
  109.     contentsExist FALSE
  110. }
  111.  
  112. ROUTE BUTTON.toggleValue_changed TO CLICKED.set_contentsExist 
  113. ROUTE BUTTON.mouseUp TO UP.set_contentsExist 
  114. ROUTE BUTTON.mouseDown TO DOWN.set_contentsExist 
  115. ROUTE BUTTON.mouseOver TO OVER.set_contentsExist 
  116.  
  117.  
  118.  
  119.